Electronic gas flow measurement and recording device

ABSTRACT

An electronic flow measurement device (EFM), for use in conjunction with a flow meter in a pressurized gas line, has a microprocessor and read-only memory (ROM), and calculates and records gas flow rates corrected for variable factors such as gas pressure, temperature, and density. Look-up tables stored in the ROM contain intermediate values calculated in accordance with selected protocols for selected ranges of input variables such as gas temperature, pressure, density, and turbine “K” factors. Based on inputs received from gas temperature and pressure sensors, the EFM selects corresponding intermediate values from the look-up tables, and then uses these values to calculate corrected gas flow rates, using software residing in the EFM. The microprocessor&#39;s power consumption is significantly reduced because the use of look-up tables reduces the complexity and extent of calculations that the EFM needs to perform, as compared with performing all required calculations in the EFM.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a division of application Ser. No. 10/790,194 filedMar. 2, 2004, now U.S. Pat. No. 6,990,414 and the disclosure of saidapplication Ser. No. 10/790,194 is fully incorporated herein byreference.

FIELD OF THE INVENTION

The present invention relates to devices for measuring and recording thevolumetric flow of pressurized gas in pipelines, particularly naturalgas.

BACKGROUND OF THE INVENTION

Accurate measurement of gas flow in pipelines is important in a varietyof situations, such as in the transmission of fuel gases such as naturalgas and propane. Fuel gases are typically sold by volumetric measure, sogas flow must be accurately measured and recorded to ensure thatcustomers are charged fully and fairly for the gas delivered to them.Accurate flow measurement is also important for optimum operationalcontrol in gas production and processing facilities.

Gas flow measurement and recording are commonly carried out by use of anorifice meter installed in a gas pipeline in conjunction with a circularchart recorder, such as the Models J8, M202, and M208 chart recordersmanufactured by Barton Instrument Systems, LLC, of Industry, Calif. Anorifice meter works on the venturi principle, in accordance withwell-known scientific formulae (specifically, Bernoulli's equation). Itsprimary feature is an orifice plate, which is a flat plate having asharp-edged circular or oval orifice that is smaller in diameter thanthe inner diameter of the pipeline. The orifice plate is installed suchthat its plane is transverse to the axis of the pipeline, and typically(though not necessarily) with the orifice coaxial with the pipeline. Theorifice plate causes a localized constriction of the gas flow, thuscausing the gas flow velocity to increase as the gas passes through theorifice, with a resultant drop in pressure on the downstream side of theorifice plate. The gas pressure on each side of the orifice plate iscontinuously measured by means of upstream and downstream pressure tapsclosely adjacent to the orifice plate. Because gas temperature is animportant factor for accurate calculation of gas flow, the gastemperature is continuously measured upstream of the orifice meter usinga temperature sensor such as a resistive temperature device (“RTD”).

The temperature and differential pressure readings are communicated tothe chart recorder, which features multiple inkpens that continuouslyplot the information onto rotating circular paper charts. These charts,which typically record readings over a 7-day period, must be regularlyreplaced with fresh charts, and the recorded charts must be analyzed andinterpreted by skilled technicians to determine the gas flowsrepresented by the information thereon. The calculation of gas flowrates must also take into consideration the particular chemicalcomposition of the gas in question, or, more specifically, the densityof the gas.

Natural gas flow calculations are typically required to be made inaccordance with analytical methods stipulated by the American GasAssociation (“AGA”). Where orifice meters are used, the applicablestandards are AGA-3 (for orifice flow calculations), and AGA-8 or NX-19(to adjust for supercompressibility).

The use of orifice meters and circular chart recorders has a number ofpractical drawbacks. The accuracy of the gas flow readings is dependenton selection of orifice plates having orifices of appropriate sizes, andthis is something that varies with the gas flow rate. Accordingly, it isperiodically necessary to change orifice plates to suit variations ingas flow rates. This requirement entails additional labour costs, asdoes the need for regular gathering and replacement of the circularcharts. To these inconveniences must be added the need for periodicadjustment, maintenance, and repair of the inkpens, plus the need tointerpret the charts before reliably accurate gas flow measurements canbe obtained.

Some of these drawbacks can be overcome by using an electronicflow-measurement device (or “EFM”) in place of a circular chartrecorder. Examples of known EFMs include the Daniel® FloBoss™ 103 andFloBoss™ 503 flow computers manufactured by Daniel Measurement andControl Inc., of Houston, Tex. Such EFMs have microprocessors or CPUs(central processing units) that directly calculate gas flows inaccordance with AGA-3 and AGA-8 (or NX-19), which are incorporated intothe EFM's memory (i.e., as “firmware”). These EFMs provide for digitalread-out of instantaneous and historical gas flow rates, and can archiveflow calculations covering a period of several weeks, such that thisinformation can be collected at larger and more convenient intervalsthan would be possible using a chart recorder. Alternatively, and evenmore advantageously, the flow rate calculations can be transmitted to aremote collection point location, by either hard-wired or wireless datacommunication links, eliminating or greatly reducing the need forregular visits by field technicians.

It can therefore be seen that EFMs can be used to avoid the drawbacks ofcircular chart recorders and the interpretation process necessarilyassociated therewith. However, the disadvantages associated with orificemeters, and in particular the recurring need to replace orifice plates,still remain. These disadvantages may be overcome by using a turbineflow meter instead of an orifice meter.

A turbine meter features a free-wheeling turbine rotor having multipleturbine blades. To measure gas flow, the turbine meter is installed in agas pipeline with the rotor coaxial with the pipe. The flow of gas inthe pipeline causes the turbine rotor to rotate. It is well establishedthat for a given turbine, there is a substantially direct relationshipbetween the number of turbine rotations and the volume of gas flowingpast the turbine. It follows that if this relationship has beenquantified, the gas flow rate can be easily determined by counting thenumber of turbine rotations over a selected time interval, and thencalculating the flow using fundamental mathematics.

The same result can obviously be achieved by counting partialrevolutions corresponding to the angular spacing of the turbine blades,and this is in fact what is almost invariably done. In some common typesof turbine meter, the turbine blades are made of a magnetic material(such as mild steel), while the turbine housing is made of anon-magnetic material (such as stainless steel). A sensing elementincorporating a permanent magnet is positioned close to but outside thearc of the turbine blades. As each blade passes by the sensor, itinterrupts the magnetic field generated by the permanent magnet. Thesensor detects these magnetic field interruptions and converts them toelectrical pulses, which may be totalized over a selected time intervalfor purposes of gas flow calculation. In other types of turbine meter,an optical sensor is used to count turbine blade pulses.

The relationship between turbine rotations and gas volume usually variesto some degree with the velocity of the gas (and therefore the flowrate). This phenomenon is taken into account by calibrating each turbineto determine its characteristics over a selected range of pulsefrequencies. In accordance with industry standards, this is typicallydone by passing known volumes of gas through the turbine at various flowrates, to produce a 10-point linearization curve plotting the turbine's“K” factor (the number of pulses per cubic foot of gas) against thepulse frequency (pulses per second). With this information at hand, gasflows can be easily calculated by determining the pulse frequency,determining the “K” factor applicable to that frequency, and thendividing the frequency by the “K” factor, resulting in a value for thegas flow (in cubic feet per second, or other desired units ofmeasurement).

However, accurate gas flow measurement with a turbine meter requiresmore information than the “K” factor of the turbine; for optimalaccuracy, the gas pressure, temperature, and density should also betaken into account. Turbine meters are typically installed inconjunction with EFMs having, in addition to a pulse counter, a pressuretransducer, which generates an electronic signal corresponding to thegas pressure upstream of the turbine, and an RTD connection, for readingthe gas temperature downstream of the turbine. The gas density isdetermined by laboratory analysis, and this information is fed into theEFM's data memory. The EFM's CPU can then calculate gas flow ratescorrected for these various inputs, in accordance with the appropriateindustry standards programmed into the EFM as firmware; i.e., AGA-7 (forturbine meters) and AGA-8 (or NX-19). Examples of known EFM's with thesecapabilities are the Model BA415R gas computer manufactured by BartonInstrument Systems, and the Daniel® FloBoss™ 504 manufactured by DanielMeasurement and Control Inc.

From the preceding discussion, it can be readily seen that the drawbacksof circular chart recorders can be eliminated by use of EFMs inconjunction with orifice meters, and also that the drawbacks of orificemeters can be eliminated by use of turbine meters in conjunction withsuitable EFMs. However, the known EFMs appropriate for use in both ofthese applications suffer from a significant disadvantage in that theyhave comparatively large electrical power requirements. The calculationsrequired to be performed in accordance with the various AGA standardsare complex, therefore entailing a CPU with substantial computationalcapacity. As well, the CPU requires very high computing speed in orderto produce substantially “real time” flow readings quickly in responseto continuous flows of input data from the magnetic pulse sensor, thepressure transducer, and the RTD. The electrical power needed to servethese computational requirements would make battery power impractical,having regard to the current state of battery technology. Therefore,EFMs are typically connected to conventional power sources (e.g.,building or plant power), or are installed with dedicated solar panels.Such EFM installations are susceptible to interruption of gas flow datacalculation and storage in the event of failure of a conventional powersource or physical damage to solar panels due to storms or vandalism.

For the foregoing reasons, there is a need for EFMs that can perform allthe functions of known EFMs as described above, in conjunction witheither orifice meters or turbine meters, while consuming substantiallyless electrical power. In particular, there is a need for such EFMswhich can operate effectively and efficiently on battery power, and cando so without sacrificing data display and storage capabilities ascompared with known EFM that use permanent power sources or dedicatedsolar panels. The present invention is directed to these needs.

SUMMARY OF THE INVENTION

In general terms, the present invention is an electronicflow-measurement device (EFM) for use in conjunction with a gas flowmeter mounted in association with a pressurized gas line, thatcalculates and records gas flow rates corrected for variable factorssuch as gas pressure (or pressure differential), temperature, chemicalcomposition, and density, using substantially less electrical power thanprior art flow computers performing similar calculation and datarecording tasks. The electrical power requirements of the presentinvention are sufficiently low that it can continuously calculate gasflows and record 40 days' worth or more of calculated flows, usinglow-power batteries as the sole power source. For example, it has beenfound in field testing that two lithium “C” cell batteries can power thedevice for up to 14 months before requiring replacement.

The EFM of the present invention achieves these electrical powerconsumption reductions by greatly reducing the extent and complexity ofthe calculations required to be performed within the device itself.Continuous calculation of “real time” flow rates, in accordance withAGA-3, AGA-7, AGA-8, and/or NX-19 (as applicable), based on a steadyflow of temperature and pressure input readings, requires a fast andpowerful microprocessor, with correspondingly high electrical powerrequirements. However, the power requirements for storage of data inread-only memory (ROM), and for retrieval of data therefrom, arecomparatively much lower. The EFM of the present invention substantiallyreduces the need for performing complex calculations in the computeritself, and instead uses ROM to store “look-up tables” containing datacorresponding to parameters calculated in accordance with desired andselected standards (e.g., AGA standards) for selected ranges of inputvariables (e.g., gas temperature, pressure, chemical composition, anddensity). For applications using a turbine meter, data corresponding tothe “K” factors for the turbine are also stored in ROM.

With all of this information stored within the device, the calculationof gas flows is greatly simplified and requires much less computingpower, and therefore much less electrical power. As with prior art flowcomputers, the EFM of the present invention receives gas temperatureinputs from a temperature sensor such as an RTD, and gas pressure inputsfrom a pressure transducer (and differential pressure inputs inapplications with orifice meters). However, instead of using theseinputs for complex calculation of gas flow rates, the EFM determinesflow rates by looking up required values from the ROM look-up tables,corresponding to the measured input parameters, and then using theseselected values to perform comparatively simple calculations (softwarefor which is stored in the EFM) to determine gas flow rates, which arethen stored in ROM for retrieval as desired. The flow rates thusdetermined have the same accuracy as if they had been calculated “fromscratch” using high-powered, high-speed microprocessors in accordancewith the appropriate AGA standards (as in prior art flow computers),because they have been calculated in accordance with the same methods.The difference is that a substantial part of the calculation process haseffectively been performed in advance, at another location, yieldingintermediate results (i.e., the look-up tables) which are entered intoROM.

The ROM data can be changed as required to suit changed conditions. Forexample, the chemical composition of natural gas flowing in a particularpipeline might be variable, causing a change in density. To optimize theaccuracy of the flow rate data being determined by the EFM, this revisedinformation could be written into the device's memory using anappropriate interface, which could be any of several well-known types ofinterface. For example, the information could be entered using a keypadinterface, or by means of a portable data storage medium such as amemory card, compact disk, or floppy disk. Alternatively, the newinformation could be entered from a remote location by means of ahard-wired or wireless data communication link.

The data recorded by the device may be conveniently retrieved and viewedby means of a digital read-out or a graphical user interface (GUI)associated with the device. Alternatively or in addition, the recordeddata can be recorded onto a portable data storage medium such as amemory card, compact disk, or floppy disk, or the data can betransmitted to a remote location by means of a hard-wired or wirelessdata communication link.

Accordingly, in one aspect the present invention is an electronic gasflow measurement device for use with an orifice meter mounted in a gaspipeline, wherein the device has components and features including:

-   -   a housing (preferably explosion-proof); a microprocessor; a        read-only memory (ROM); data input means, for entering data in        the ROM; data output means, for retrieving data stored in the        ROM; means for receiving gas temperature inputs; means for        receiving gas pressure inputs from upstream and downstream of        the orifice plate; and a power source for operating the        microprocessor;        wherein the ROM stores look-up tables of intermediate values for        selected gas flow calculation parameters determined in        accordance with selected calculation methods for selected ranges        of gas temperature, density, and pressure differentials, and        wherein the device is programmed with software for selecting        intermediate values from the look-up tables corresponding to gas        temperature and temperature inputs, and for processing the        selected intermediate values to calculate gas flow rates        adjusted for temperature, pressure, and density.

In another aspect, the invention is an electronic gas flow measurementdevice for use with a turbine meter mounted in a gas pipeline, whereinthe device has components and features including:

-   -   a housing (preferably explosion-proof); a microprocessor; a        read-only memory (ROM); data input means, for entering data in        the ROM; data output means, for retrieving data stored in the        ROM; means for counting turbine pulses; means for receiving gas        temperature inputs; means for receiving gas pressure inputs from        upstream of the turbine; and a power source for operating the        microprocessor;        wherein the ROM stores look-up tables of intermediate values for        selected gas flow calculation parameters determined in        accordance with selected calculation methods for selected ranges        of gas temperature, density, and pressure, and wherein the        device is programmed with software for selecting intermediate        values from the look-up tables corresponding to gas temperature        and temperature inputs, for determining turbine “K” factors        corresponding to turbine pulse count inputs, and for processing        the selected intermediate values and “K” factors to calculate        gas flow rates adjusted for temperature, pressure, and density.

In a further aspect, the invention is a method of calculating gas flowrates in conjunction with an orifice meter mounted in a gas pipeline,said method including the steps of:

-   -   calculating look-up tables comprising intermediate values for        selected gas flow calculation parameters, in accordance with        selected calculation methods, for selected ranges of one or more        selected input variables, such as gas temperature, density, and        pressure differentials (across the orifice plate of the orifice        meter);    -   collecting data readings for the selected input variables for a        gas flowing in the pipeline;    -   using the appropriate look-up tables, determining a set of        intermediate values for the selected gas flow calculation        parameters, corresponding to the collected data readings; and    -   using the intermediate values determined from the look-up tables        as input variables, calculating a gas flow rate using selected        calculation methods.

In a yet further aspect, the invention is a method of calculating gasflow rates in conjunction with a turbine meter mounted in a gaspipeline, said method including the steps of:

-   -   calculating look-up tables comprising intermediate values for        selected gas flow calculation parameters, in accordance with        selected calculation methods, for selected ranges of one or more        selected input variables, such as gas temperature, density, and        pressure;    -   collecting data readings for the selected input variables for a        gas flowing in the pipeline;    -   using the appropriate look-up tables, determining a set of        intermediate values for the selected gas flow calculation        parameters, corresponding to the collected data readings;    -   determining the “K” factor for the turbine over a selected range        of turbine pulse frequencies, and preparing a corresponding        look-up table;    -   collecting a turbine pulse frequency reading, and determining a        corresponding “K” factor from the corresponding look-up table;        and    -   using the set of intermediate values and “K” factor determined        from the look-up tables as input variables, calculating a gas        flow rate using selected calculation methods.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will now be described withreference to the accompanying figures, in which numerical referencesdenote like parts, and in which:

FIG. 1 is a cutaway view of a prior art turbine meter, with flowstraightening tubes.

FIG. 2 is a front view of the preferred embodiment of an electronic gasflow measurement device in accordance with the invention.

FIG. 2A is a block diagram of the computer of an electronic gas flowmeasurement device in accordance with an embodiment of the invention.

FIG. 3 is a schematic drawing illustrating a preferred method ofinstalling the electronic gas flow measurement device in a gas line inassociation with a turbine flow meter.

FIG. 4 is a block diagram for the interface software for programming theelectronic flow measurement device in accordance with one embodiment ofthe invention.

FIG. 4A illustrates an exemplary “ModBus and Power Setup” screen inaccordance with the interface software.

FIG. 4B illustrates an exemplary “Surface Box Setup” screen inaccordance with the interface software.

FIG. 4C illustrates an exemplary “Gas Mix Analysis” screen in accordancewith the interface software.

FIG. 4D illustrates an exemplary “Permanent Sample Rates” screen inaccordance with the interface software.

FIG. 4E illustrates an exemplary time synchronization screen inaccordance with the interface software.

FIG. 5 is a block diagram for the main operating loop of the softwareresident in the electronic gas flow measurement device in accordancewith one embodiment of the invention for use in association with aturbine flow meter.

FIG. 5A is a block diagram for the pressure routine of the mainoperating loop.

FIG. 5B is a block diagram for the temperature routine of the mainoperating loop.

FIG. 5C is a block diagram for the turbine routine of the main operatingloop.

FIG. 5D is a block diagram for the AGA-7 routine of the main operatingloop.

FIG. 5E is a block diagram for the AGA-8 routine of the main operatingloop.

FIG. 5F is a block diagram for the display routine of the main operatingloop.

FIG. 5G is a block diagram for the MMC read/write routine of the mainoperating loop.

FIG. 5H is a block diagram for the button routine of the main operatingloop.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 illustrates a prior art turbine meter 30, mounted in a flangedpipe-spool housing 32 for connection into a pressurized gas line. Theturbine meter 30 has a free-wheeling rotor 34 with multiple rotor blades35. The rotor 34 is mounted on a shaft 36 that is substantially coaxialwith the pipe spool. The turbine meter 30 may include flow straighteningtubes 38 to promote non-turbulent flow through the meter 30, thusenhancing the accuracy of gas flow measurements made with the turbinemeter 30. A sensing element 40 is housed in a riser 42 disposed in linewith the rotor 34, for sensing and counting turbine rotations aspreviously described.

FIG. 2 illustrates an electronic flow measurement and recording device(“EFM”) 10 in accordance with the present invention, for use with aturbine flow meter. FIG. 2A is a block diagram of the EFM 10 andcomponents thereof as will be described herein. The EFM 10 has a housing12 which in the preferred embodiment will be an explosion-proof housing.The housing 12 has a turbine connection port 14, for connecting thedevice 10 to the sensing element riser 42 of a turbine flow meter 30mounted in a gas pipeline 50, as schematically illustrated in FIG. 3.

As illustrated in FIG. 2A, housing 12 of the EFM 10 encloses a computer11 having a microprocessor 11A and a read-only memory (ROM) 11B, withdata input means 13 for entering data in the ROM. The EFM 10 alsoincludes computer connection means for connecting the EFM 10 with anexternal computer for purposes of programming the microprocessor 11A andthus “configuring” the EFM 10 in accordance with protocols describedlater herein. The computer connection means may be a serial port 20 asshown in FIG. 2 and FIG. 2A. The computer connection means may be usedas the data input means 13, in conjunction with an external computer.However, in the preferred embodiment the data input means is a portable,readable and writable data storage means, which may be an MMC card(multi-media card), SD card (secure data card), or other portable memorymeans. Accordingly, in the preferred embodiment the EFM 10 has means forreading and writing data from or to a portable data storage means. Inthe particularly preferred embodiment illustrated in FIG. 2, the EFM 10has an MMC card slot 22 for receiving an MMC card to be read by an MMCcard reader/writer (not shown) disposed inside the housing 12. Thisfeature can also be adapted for use as the means for programming themicroprocessor.

The EFM 10 also has data output means 15 for retrieving data stored inthe ROM 11B. As shown in FIG. 2, the data output means 15 will include adisplay screen 24 mounted in a face plate 23 that provides a digitaldisplay of current or historical gas flow data stored in the ROM 11B.The screen 24 is preferably protected by a transparent face plate cover25 made of glass or plastic. The EFM 10 features an internal button 26for activating the display of gas flow data. The internal button 26 isaccessible only upon removal of the face plate cover 25. An externaldisplay button 28 is also provided for activating the display of gasflow data, and for additional functions as described later herein.

As previously indicated, the preferred embodiment of the EFM 10 includesan MMC card reader/writer, which permits the use of an MMC card as anadditional and particularly convenient data output means 15, as will bedescribed herein.

It will be readily appreciated by persons skilled in the art that thedisplay screen 24 may be configured in a variety of ways, for selectivedisplay of different gas flow parameters. By way of example, the displayscreen 24 in FIG. 2 is adapted to display, in appropriately labeledscreen sectors, parameters including gas pressure (gauge or absolute),gas flow sampling frequency, gas flow measurements and correspondingunits (e.g., thousands of cubic feet or thousands of cubic meters perhour or per day), and total daily gas flows (with corresponding dates).In the preferred embodiment, the ROM 11B of the EFM 10 has capacity tostore daily gas flows for at least 40 days, thus greatly reducing thefrequency with which a technician needs to gather data from the unit.The EFM 10 is adapted such that a technician can use either the internalbutton 26 or the external button 28 toggle through all of the daily flowrecords stored in the ROM 11B, thus displaying each day's total on thescreen 24 for review and/or transcription by the technician as desired.

In the preferred embodiment, however, the collection of historical dailygas flows is most efficiently accomplished by removing the face platecover 25 and inserting an MMC card into the MMC slot 22. The EFM 10 maybe configured in “always on” mode, in which case all data in the ROM 11B will be automatically downloaded onto the MMC card. Alternatively, theEFM 10 may be configured so as to require depression of the externalbutton 28 to signal the MMC card reader/writer to download the data fromthe ROM 11B onto the MMC card. In either case, the EFM 10 is configuredso as to display a message such as “Card Busy” on the display screen 24while downloading is in progress, and then a message such as “Card Done”to indicate that downloading is complete and that the MMC card may beextracted from the MMC card slot 22.

In alternative embodiments, the data output means 15 may include ahard-wired or wireless communications link to a computer distant fromthe EFM 10. In other embodiments, the data may be downloaded from theROM 11B of the EFM 10 to an external computer connected to the EFM 10via the serial port 20 or other computer connection means.

The downloaded data on the MMC card may be transferred to a distantlocation, for processing and recording as necessary desired, either bydownloading the data from the MMC card (using a suitable MMC cardreader) into a computer located at the distant location. Alternatively,the data may be downloaded from the MMC card to an appropriatelyprogrammed desktop or laptop computer or PDA (“personal digitalassistant” such as a “Palm Pilot”™ or “Blackberry”™) and transmittingthe data to the distant computer by e-mail. Cellular telephones equippedwith an MMC or combined MMC/SD card slot, or combined PDA/cellularphones with such slot (for example, the Kyocera™ Model 7135), may alsobe used for transmission of data from the EFM 10 to a distant location,by inserting the MMC (or SD) card into the slot.

In another alternative embodiment, a “black box” data transmission unit(not shown) having a data processor and a card reader may be provided inconvenient proximity to the EFM 10 (such as in a meter shed). The “blackbox” is in communication with a distant computer terminal by eitherhard-wired or wireless connection links, and is adapted or programmedsuch that upon insertion of an MMC card containing data downloaded fromthe EFM 10, the data will be automatically read by the card reader andtransmitted in appropriate format to the distant terminal, with orwithout need for a “send” command.

Alternative embodiments of the invention may use an SD card as a datamedium rather than an MMC card, with appropriate modifications as willbe readily apparent to persons skilled in the art upon review of theforegoing descriptions of embodiments using an MMC card.

The EFM 10 of the present invention requires electrical power to operateits microprocessor. Where convenient, the source of electrical power maybe a conventional power distribution system, in which case the EFM 10may be plugged or hard-wired into the power system. In the preferredembodiment, however, the EFM 10 may be powered by one or more batteries.As previously mentioned, the power consumption of the EFM 10 issufficiently low that two lithium “C” cell batteries have been foundsufficient to power the EFM 10 for up to 14 months before needingreplacement, while performing all of the flow calculation and datastorage functions described herein. The batteries (not shown) arepreferably housed within the housing 12 of the EFM 10. The EFM 10 may beadapted for connection both to batteries and to a conventional powersource, with the batteries supplying power to the EFM 10 only in theevent of disruption of power from the conventional power source.

FIG. 3 illustrates a typical installation of the EFM 10 of the presentinvention, adapted for use with and mounted in association with aturbine flow meter 30 installed, in a pressurized gas pipeline 50. Aby-pass line 52 is connected to the pipeline 50 on either side of theturbine meter 30. Valves V1 and V3 in the pipeline 50 and valve V2 inthe by-pass line 52 are used to allow gas to pass through the turbinemeter 30 or by-pass the turbine meter 30 as desired. Valves V1, V2, andV3 will typically be set so that gas passes through the turbine meter30, as it will most commonly be desired to obtain continuously sampledflow rate data. However, the by-pass line 52 may be used when theturbine meter 30 or any of its associated components are beinginstalled, serviced, or replaced. Preferably, a strainer S is installedin the pipeline 50 upstream of the turbine meter 30 and downstream ofvalve V1.

A pressure sensor line 17 connects between the pressure sensor port 16of the EFM 10 and a pressure transducer P1 installed in pipeline 50 at apoint upstream of the turbine meter 30, so that the pressure of the gasflowing in pipeline 50 can be measured and the corresponding pressurereadings can be communicated to the EFM 10. Similarly, a temperaturesensor line 19 connects between the temperature sensor port 18 of theEFM 10 and a temperature transducer T1 installed in pipeline 50 at apoint downstream of the turbine meter 30, so that the temperature of thegas flowing in pipeline 50 can be measured and the correspondingtemperature readings can be communicated to the EFM 10.

The operation of the turbine meter embodiment of the EFM 10 of theinvention will now be described with reference to how the EFM 10 may beprogrammed to perform the functions previously described.

FIG. 4 schematically depicts the programming steps for loading softwareonto the computer 11 of a turbine meter embodiment of the EFM. Theseprogramming steps are carried out on a separate programming computertemporarily connected to the EFM via the computer connection means(serial port 20 in the preferred embodiment, as previously described),using appropriate USB or serial cable and serial interface box. Theprogramming computer may be a desktop computer, or a portable computersuch as a laptop. The EFM, also referred to as the DCR (for “digitalchart recorder”) head unit, will typically be programmed prior to fieldinstallation, to suit the characteristics (e.g., “K” factors) of theturbine meter to which it will be fitted, and to suit the known oranticipated characteristics of the gas flowing in the pipeline in whichthe meter will be mounted. However, the EFM may also be reprogrammed inthe field to suit changed operating parameters (for example, gascomposition, or new “K” factors when a turbine meter is being replaced),and the use of a portable computer for the programming computer isparticularly advantageous in such situations.

Referring to FIG. 4, the first step in the configuration procedure isthe entry of user-programmable parameters (step 120). The first screen(appearing on the monitor of the programming computer) will be a“ModBus® and Power Setup” screen generally as shown in FIG. 4A. Thisscreen will initially indicate “Off”, and “ModBus Slave” will beselected (the EFM being the “slave” and the programming computer beingthe “master”). The user then designates whether the EFM is to operatesolely on battery power, or on power from an external source, with theEFM's battery as a back-up power source to be activated upon failure ofthe external source. The ModBus Options screen also allows the user toselect a serial communication speed in bauds (bits per second). The userthen designates a unique address to identify the EFM for purposes ofcommunication with the programming computer. This unique identifier alsoserves to identify the specific well in association with which the EFMis installed.

The next screen will be a “Surface Box Setup” screen generally as shownin FIG. 4B (“surface box” being an alternative reference for the EFM'scomputer 11). The Surface Box Setup screen allows the user to configurethe EFM in “Always On” mode, in which case it will continuously displayflow data, or in “Always Off” or “User Turn On” mode, in either of whichcases the EFM will need to be manually turned on in order to displayflow data. These latter two modes are preferable to the “Always On” modein order to minimize power consumption. The user may also select howlong data remains displayed after the EFM is turned on. Other variablesand options that may be entered or selected on the Surface Box Setupscreen include password protection (on or off), pressure display units(kiloPascals or pounds per square inch; gauge or absolute), temperaturedisplay units (Celsius or Fahrenheit), and gas flow measurement units(thousands of cubic meters, or thousands of cubic feet, per unit time).In preferred embodiments, the user will also be able to select whetherthe EFM is to be configured for use with a turbine meter or an orificemeter.

The next screen will be a “Gas Mix Analysis” screen generally as shownin FIG. 4C. On this screen, the user enters details of the chemicalcomposition of the gas to be measured using the EFM (such detailstypically having been determined by laboratory analysis). Also on thisscreen, the user may enter “K” factors for a turbine meter to which theEFM will be mounted. The serial number of the turbine meter may also beentered on this screen. The “K” factors (in pulses per “actual” cubicfoot of gas) will typically be obtained from a 10-point linearizationcurve determined in calibration tests as previously described. AlthoughFIG. 4C for simplicity shows a uniform “K” factor for ten differentturbine frequencies (measured in hertz; i.e., rotor revolutions persecond), it will be appreciated that the “K” factors will typically varyfrom one frequency to another.

Upon entry of the foregoing information, the programming computer,suitably programmed, generates polynomial coefficients for AGA-8calculations from the gas mix values (step 130). It then generates avalue map (i.e., “look-up table”) for all other required coefficients(step 140).

Next, a “Permanent Sample Rates” screen will appear, generally as shownin FIG. 4D, allowing the user to enter additional information (step 160)including company name (i.e., owner of gas well), well location,preferred gas sampling frequency (commonly every 10 seconds), gas flowmeasurement data storage frequency or “store time” (commonly everyminute), and “contract time” (i.e., preferred starting hour forcompiling “daily” gas flow records).

The next screen to appear on the programming computer display will be atime synchronization screen generally as shown in FIG. 4E. This simplyindicates whether the time indicated by the internal clock of the EFM'smicroprocessor matches the time indicated by the programming computer,and, if these times are different, allows the user to select one time orthe other (steps 170, 180).

All of the data entered or generated to this point is now downloaded tothe EFM (step 190), whereupon the EFM sends a message back to theprogramming computer confirming whether it has been programmed properly(step 200). If the EFM has not been properly programmed, the programmingcomputer will revert to the first user input screen (step 205), and theuser input process is repeated as necessary. If the EFM has beenproperly programmed, the programming computer will generate aprogramming report, which may be stored electronically or printed asdesired, to provide a record of the EFM's configuration (step 210). Theprogramming computer then exits the interface software (step 220). Theprogramming computer may then be disconnected from the EFM, which isthen ready for use in its intended field application.

The field operation of the EFM may be best understood by reference toFIG. 5, which schematically depicts the main operating loop of themicroprocessor 11A of the EFM 10 in accordance with a preferredembodiment. As indicated, the main operating loop comprises a number ofroutines, which the microprocessor 11A runs sequentially at selectedsampling intervals (in accordance with the configuration of the EFM).Upon initiation of pressure routine 310 (FIG. 5A) with a request (step311) from the main loop, the EFM 10 obtains a current analog gaspressure reading from the pressure transducer (step 312). This pressurereading is first checked to confirm that it is within the predeterminedoperating range of the pressure transducer. Then the pressure reading iscorrected as may be necessary by comparing it against a pressurecalibration table stored in the ROM 11B of the EFM 10. The pressurecalibration table corresponds to the specific pressure transducer beingused with the EFM 10, and facilitates correction for any inherenttendencies for “drift” of pressure readings across the pressuretransducer's operating range. Next, a current gas temperature reading isobtained from the temperature transducer (step 313). The EFM 10 thenuses these pressure and temperature readings in known polynomialequations to determine a temperature-compensated pressure value (step314). The temperature-compensated pressure value is then returned to themain loop (step 315).

The microprocessor then initiates temperature routine 320 (FIG. 5B) uponreceipt of a request (step 321) from the main loop. At step 322, acurrent analog temperature reading is obtained from the temperaturetransducer, and this reading is checked to confirm that it is within thepre-determined operating range of the temperature transducer. Then thetemperature reading is corrected as may be necessary by comparing itagainst a temperature calibration table stored in the ROM 11B of the EFM10. The temperature calibration table corresponds to the specifictemperature transducer being used with the EFM 10, and facilitatescorrection for any inherent tendencies for “drift” of temperaturereadings across the temperature transducer's operating range. Thecorrected temperature reading is then returned to the main loop (step323).

In turbine routine 330 (FIG. 5C), the EFM 10 receives pulse signals fromthe pulse-counting sensor element 40 of the turbine meter 30 (step 331),whereupon the EFM 10 executes a test routine (step 332) to confirm thatthese are real pulse signals rather than signals resulting from spuriousevents. Upon confirmation of a valid pulse signal, the EFM 10 incrementsa stored global pulse count value and a global time base (step 333). A“raw” or uncorrected gas flow rate value is then determined, bycomparison of the pulse count value against the K-factor look-up tablestored in the ROM 11B of the EFM 10, and the stored global gas flowvalue is incremented (step 334). This uncorrected value isconventionally measured in “actual” cubic feet (or cubic meters) perunit of time.

In AGA-7 routine 340 (FIG. 5D), the currently stored global gas flowvalue is corrected for temperature and pressure in accordance with theAGA-7 standard. Upon receipt of a request from the main loop (step 341),the EFM 10 reads the current global pressure value (step 342),temperature value (step 343), and uncorrected gas flow value (step 344).These values are compared to look-up tables stored in the ROM 11B of theEFM 10 to determine a new global gas flow value corrected for pressureand temperature in accordance with AGA-7, and this corrected value isstored in the ROM 11B (step 345).

In AGA-8 routine 350 (FIG. 5E), the currentpressure-and-temperature-corrected gas flow value is corrected for gascomposition (i.e., gas density). Upon receipt of a request from the mainloop (step 351), the EFM 10 reads the current AGA-7 global gas flowvalue (step 352) and compares it against the AGA-8 look-up table in theROM 11B to determine a new and fully corrected gas flow value,conventionally measured in “standard” cubic feet (or cubic meters) perunit of time (step 353). This value is stored and returned to the mainloop (steps 354, 360).

Display routine 370 (FIG. 5F) simply allows for selection of imperial ormetric units for display or downloading of gas flow measurement data(i.e., cubic feet or cubic meters per unit of time). Upon receipt of arequest from the main loop (step 371), the EFM 10 converts gas flow datafrom metric to imperial units, or vice versa (step 372), and writes theconverted data to a display buffer (step 373).

MMC card routine 380 (FIG. 5G) is used to download gas flow data onto anMMC card. The EFM 10 first senses whether an MMC card has been insertedin the card reader of the EFM 10 (step 381). If so, the EFM 10automatically downloads all fully-corrected gas flow measurement data(as determined in AGA-8 routine 350) since the last time a card wasinserted (step 382). The date and time of the present card insertion isthen stored (step 383). The MMC card may also store the serial number ofthe EFM 10 and its unique, pre-programmed, well-specific identifier.

Button routine 390 (FIG. 5H) is initiated when it is desired to readdata stored in the ROM 11B of the EFM 10 directly from the digitaldisplay screen 24 of the EFM 10. The EFM 10 can be programmed to displaya variety of stored data values, and the user can toggle through thesevalues by repeatedly depressing either the internal display button 26 orthe external display button 28 of the EFM 10. Upon sensing that eitherthe internal display button 26 or the external display button 28 hasbeen depressed (step 391), the EFM 10 checks a status counter todetermine what data value corresponds to the display button's current“toggle” position (step 392), and writes the corresponding value to thedisplay screen 24 (step 393).

It will be readily appreciated by those skilled in the art that variousmodifications of the present invention may be devised without departingfrom the essential concept of the invention, and all such modificationsare intended to be included in the scope of the claims appended hereto.By way of specific example (but without limiting the scope of thepreceding statement), the construction and operation of the EFM of thepresent invention have been described in the context of embodiments foruse with turbine flow meters, and with gas flow measurements beingcorrected in accordance with AGA-7 and AGA-8. To the extent notexplicitly described herein, the construction and operation ofembodiments of the invention for use with turbine flow meters inconjunction with AGA-7 and NX-19, as well as embodiments for use withorifice meters in conjunction with AGA-3 and AGA-8, or, alternatively,AGA-3 and NX-19, or in conjunction with other calculation methods foruse in calculating gas flows, may be readily deduced by persons skilledin the art of the invention, by analogous extension of the principlesand procedures described in this specification.

In this patent document, the word “comprising” is used in itsnon-limiting sense to mean that items following that word are included,but items not specifically mentioned are not excluded. A reference to anelement by the indefinite article “a” does not exclude the possibilitythat more than one of the element is present, unless the context clearlyrequires that there be one and only one such element.

1. An electronic gas flow measurement device for use with an orificemeter mounted in a gas pipeline, said device comprising: (a) a housing;(b) a computer enclosed with the housing, and having a microprocessorand a read-only memory (ROM); (c) data input means, for entering data inthe ROM; (d) data output means, for retrieving data stored in the ROM;(e) means for receiving gas temperature inputs; and (f) means forreceiving gas pressure inputs from upstream and downstream of theorifice plate of the orifice meter; wherein: (g) the ROM is adapted tostore look-up tables of intermediate values for selected gas flowcalculation parameters determined in accordance with one or moreselected calculation method for selected ranges of gas temperature,density, and pressure differentials; and (h) the microprocessor isprogrammed with software for: h.1 selecting intermediate values from thelook-up tables corresponding to gas temperature and temperature inputs;and h.2 processing the selected intermediate values to calculate gasflow rates adjusted for temperature, pressure, and density, inaccordance with one or more selected gas flow rate calculation methods.2. The device of claim 1, wherein the housing is an explosion-proofhousing.
 3. The device of claim 1, wherein the data input meanscomprises a keypad interface.
 4. The device of claim 1, wherein the datainput means comprises a portable data storage medium.
 5. The device ofclaim 4, further comprising an MMC card reader, and wherein the portabledata storage medium is an MMC card.
 6. The device of claim 1, whereinthe data output means comprises a digital read-out.
 7. The device ofclaim 1, wherein the data output means comprises an MMC card.
 8. Thedevice of claim 1, wherein the data output means comprises a graphicaluser interface.
 9. The device of claim 1, wherein the data output meanscomprises a hard-wired data communication link.
 10. The device of claim1, wherein the data output means comprises a wireless data communicationlink.
 11. The device of claim 1, wherein the means for receiving gastemperature inputs comprises a resistive temperature device.
 12. Thedevice of claim 1, further comprising one or more batteries forsupplying electrical power to the computer.
 13. The device of claim 1,wherein the software is adapted to perform calculations using methodsconforming with AGA-3 and AGA-8.
 14. The device of claim 1, wherein thesoftware is adapted to perform calculations using methods conformingwith AGA-3 and NX-19.
 15. A method of calculating gas flow rates inconjunction with an orifice meter mounted in a gas pipeline, said methodcomprising the steps of: (a) calculating look-up tables comprisingintermediate values for selected gas flow calculation parameters, inaccordance with one or more selected calculation methods, for selectedranges of one or more selected input variables; (b) collecting datareadings for the selected input variables for a gas flowing in thepipeline; (c) using the appropriate look-up tables, determining a set ofintermediate values for the selected gas flow calculation parameters,corresponding to the collected data readings; (d) using the intermediatevalues determined from the look-up tables as input variables,calculating a gas flow rate using one or more selected calculationmethods; (e) storing the calculated gas flow rate in a read-only memoryin a computer; and (f) retrieving the calculated gas flow rate from theread-only memory, using data output means.
 16. The method of claim 15,wherein the one or more selected input variables include one or morevariables selected from the group consisting of differential gaspressures, gas temperature, and gas density.
 17. The method of claim 15,wherein the calculation methods used in the step of calculating a gasflow rate include methods conforming with AGA-3 and AGA-8.
 18. Themethod of claim 15, wherein the calculation methods used in the step ofcalculating a gas flow rate include methods conforming with AGA-3 andNX-
 19. 19. The method of claim 15, wherein: (a) the look-up tables andthe collected data readings for the selected input variables are storedin a read-only memory; and (b) the steps of determining a set ofintermediate values and calculating a gas flow rate are performed usinga programmed computer.